function columns(vm) {
  const cols = [
    {
      title: '序号',
      key: 'rowIndex',
      width: 60,
      align: 'center',
      customRender: function (text, row, index) {
        if (row.totalName == '合计') {
          return {
            children: vm.transformVnode('合计'),
            attrs: {
              colSpan: 3,
            },
          }
        } else {
          if (row.serialnumber) {
            return 1
          }
          return (vm.ipagination.current - 1) * 10 + Number(index - 1)
        }
      }
    },
    {
      title: '单位简称',
      align: 'center',
      children: [
        {
          title: '二级单位',
          align: 'center',
          dataIndex: 'ejdw',
          key: 'ejdw',
          customRender: function (text, row, index) {
            if (row.totalName == '合计') {
              return {
                attrs: {
                  colSpan: 0,
                },
              }
            } else
              return {
                children: vm.TransformVnodeEllipsis(text, row, 'ejdw')
              }
          },
        },
        {
          title: '三级单位',
          align: 'center',
          dataIndex: 'sjdw',
          key: 'sjdw',
          customRender: function (text, row, index) {
            if (row.totalName == '合计') {
              return {
                attrs: {
                  colSpan: 0,
                },
              }
            } else
              return {
                children: vm.TransformVnodeEllipsis(text, row, 'sjdw')
              }
          }
        },
      ]
    },
    {
      title: '工程名称',
      key: 'gcmc',
      dataIndex: 'gcmc',
      align: 'center',
      scopedSlots: { customRender: 'gcmc' },
    },
    {
      title: '项目类型',
      key: 'xmlx',
      dataIndex: 'xmlx',
      align: 'center',
      scopedSlots: { customRender: 'xmlx' },
    },
    {
      title: '投资/承包项目',
      key: 'tzcblx',
      dataIndex: 'tzcblx',
      align: 'center',
      scopedSlots: { customRender: 'tzcblx' },
    },
    {
      title: '	项目所在地（省、市）',
      key: 'xmszd',
      dataIndex: 'xmszd',
      align: 'center',
      scopedSlots: { customRender: 'xmszd' },
    },
    // 久竣未结/已竣未结/已竣已结
    {
      title: '项目状态（久竣未结/已竣未结/已竣已结）',
      key: 'xmzt',
      dataIndex: 'xmzt',
      align: 'center',
      scopedSlots: { customRender: 'xmzt' },
    },
    {
      title: '业主情况',
      align: 'center',
      children: [
        // 政府,国有企事业单位,民营企业,股份公司所属投资公司,股份公司总包部
        {
          title: '业主类别',
          align: 'center',
          dataIndex: 'xzlb',
          key: 'xzlb',
          scopedSlots: { customRender: 'xzlb' },
        },
        {
          title: '业主名称',
          align: 'center',
          dataIndex: 'xzmc',
          key: 'xzmc',
          scopedSlots: { customRender: 'xzmc' },
        },
      ]
    },
    {
      title: '是否已列入股份公司专项治理清单',
      key: 'sflrzlqd',
      dataIndex: 'sflrzlqd',
      align: 'center',
      scopedSlots: { customRender: 'sflrzlqd' },
    },
    {
      title: '工期',
      align: 'center',
      children: [
        {
          title: '合同开工日期',
          align: 'center',
          dataIndex: 'htkgText',
          key: 'htkgText',
          scopedSlots: { customRender: 'htkgText' },
        },
        {
          title: '合同完工日期',
          align: 'center',
          dataIndex: 'htwgText',
          key: 'htwgText',
          scopedSlots: { customRender: 'htwgText' },
        },
        {
          title: '实际开工日期',
          align: 'center',
          dataIndex: 'sjkgText',
          key: 'sjkgText',
          scopedSlots: { customRender: 'sjkgText' },
        },
        {
          title: '实际交工验收日期',
          align: 'center',
          dataIndex: 'sjjgysText',
          key: 'sjjgysText',
          scopedSlots: { customRender: 'sjjgysText' },
        },
        {
          title: '停工日期',
          align: 'center',
          dataIndex: 'tgrqText',
          key: 'tgrqText',
          scopedSlots: {customRender: 'tgrqText' },
        },
        {
          title: '最近一期验工计价日期',
          align: 'center',
          dataIndex: 'ygjjText',
          key: 'ygjjText',
          scopedSlots: { customRender: 'ygjjText' },
        },
      ]
    },

    {
      title: '是否已经完成竣工结算',
      key: 'sfjgjs',
      dataIndex: 'sfjgjs',
      align: 'center',
      scopedSlots: { customRender: 'sfjgjs' },
    },

    {
      title: '合同总价',
      align: 'center',
      children: [
        {
          title: '初始合同',
          align: 'right',
          dataIndex: 'csht',
          key: 'csht',
          scopedSlots: { customRender: 'csht' },
        },
        {
          title: '补充合同',
          align: 'right',
          dataIndex: 'bcht',
          key: 'bcht',
          scopedSlots: { customRender: 'bcht' },
        },
      ]
    },

    {
      title: '责任成本',
      align: 'center',
      children: [
        {
          title: '目标利润',
          align: 'right',
          dataIndex: 'mblr',
          key: 'mblr',
          scopedSlots: { customRender: 'mblr' },
        },
        {
          title: '目标利润率',
          align: 'right',
          dataIndex: 'mblrl',
          key: 'mblrl',
          scopedSlots: { customRender: 'mblrl' },
        },
      ]
    },

    {
      align: 'center',
      slots: { title: 'endTimeTitleA' },
      children: [
        {
          title: '开累账面利润（计提的上级管理费还原为利润）',
          align: 'right',
          dataIndex: 'klzmlr',
          key: 'klzmlr',
          scopedSlots: { customRender: 'klzmlr' },
        },
        {
          title: '项目实际利润',
          align: 'center',
          children: [
            {
              title: '开累验工计价（不含税）',
              align: 'right',
              dataIndex: 'klygjj',
              key: 'klygjj',
              scopedSlots: { customRender: 'klygjj' },
            },
            {
              title: '待批复验工计价',
              align: 'right',
              dataIndex: 'dpfygjj',
              key: 'dpfygjj',
              scopedSlots: { customRender: 'dpfygjj' },
            },
            {
              title: '合同履约成本-工程施工',
              align: 'right',
              dataIndex: 'htlycb',
              key: 'htlycb',
              scopedSlots: { customRender: 'htlycb' },
            },
            {
              title: '已发生未列账成本（包括未入账、未结转劳务、材料、机械等成本）',
              align: 'right',
              dataIndex: 'yfswlcb',
              key: 'yfswlcb',
              scopedSlots: { customRender: 'yfswlcb' },
            },
            {
              title: '虚列超列成本',
              align: 'right',
              dataIndex: 'xlclcb',
              key: 'xlclcb',
              scopedSlots: { customRender: 'xlclcb' },
            },
            {
              title: '上级管理费（包括二三级公司收取管理费）',
              align: 'right',
              dataIndex: 'sjglf',
              key: 'sjglf',
              scopedSlots: { customRender: 'sjglf' },
            },
            {
              title: '开累利润',
              align: 'right',
              dataIndex: 'kllr',
              key: 'kllr',
              scopedSlots: { customRender: 'kllr' },
            },
          ]
        },
      ]
    },

    {
      key: 'kcwz',
      slots: { title: 'endTimeTitleB' },
      dataIndex: 'kcwz',
      align: 'right',
      children: [
        {
          title: '账面',
          align: 'right',
          dataIndex: 'kcwzZm',
          key: 'kcwzZm',
          scopedSlots: { customRender: 'kcwzZm' },
        },
        {
          title: '实际',
          align: 'right',
          dataIndex: 'kcwzSj',
          key: 'kcwzSj',
          scopedSlots: { customRender: 'kcwzSj' },
        },
      ]
    },

    {
      align: 'center',
      slots: { title: 'endTimeTitleC' },
      children: [
        {
          title: '应收工程款（不含质保金）',
          align: 'right',
          dataIndex: 'ysgck',
          key: 'ysgck',
          scopedSlots: { customRender: 'ysgck' },
        },
        {
          title: '应收质保金',
          align: 'right',
          dataIndex: 'yszbj',
          key: 'yszbj',
          scopedSlots: { customRender: 'yszbj' },
        },
        {
          title: '二三级公司净垫资（+）/项目净上缴资金（-）',
          align: 'right',
          dataIndex: 'gsdzsjzj',
          key: 'gsdzsjzj',
          scopedSlots: { customRender: 'gsdzsjzj' },
        },
        {
          title: '账面应付外部债务',
          align: 'right',
          dataIndex: 'zmyfwbzw',
          key: 'zmyfwbzw',
          scopedSlots: { customRender: 'zmyfwbzw' },
        },
      ]
    },
    {
      title: '选择竣工未结的原因分类，并另附书面说明未完成竣工结算原因、工作目标、下一步措施',
      key: 'reason',
      dataIndex: 'reason',
      align: 'center',
      scopedSlots: { customRender: 'reason' },
    },
    {
      title: '已竣已结项目是否已经末次考核兑现',
      key: 'yjmckh',
      dataIndex: 'yjmckh',
      align: 'center',
      scopedSlots: { customRender: 'yjmckh' },
    },
    {
      title: '简述已竣已结项目未考核兑现的原因',
      key: 'jsyjyjxkh',
      dataIndex: 'jsyjyjxkh',
      align: 'center',
      scopedSlots: { customRender: 'jsyjyjxkh' },
    },
    {
      title: '备注',
      key: 'remark',
      dataIndex: 'remark',
      align: 'center',
      scopedSlots: { customRender: 'remark' },
    },
    {
      dataIndex: 'submitFlag',
      align: 'center',
      title: "状态",
      key: 'submitFlag',
      fixed: 'right',
      width: 80,
    },
    {
      dataIndex: 'action',
      align: 'center',
      title: "操作",
      scopedSlots: { customRender: 'action' },
      key: 'action',
      width: 150,
      fixed: 'right',
    }

  ]
  return cols
}

export default columns